Ext.Loader.setConfig({
    enabled: true
});
Ext.Loader.setPath('Ext.ux', rootPath + '/res/extjs/ux/');
Ext.require(['Ext.data.*', 'Ext.grid.*', 'Ext.util.*',
    'Ext.form.field.ComboBox', 'Ext.form.FieldSet',
    'Ext.tip.QuickTipManager', 'Ext.ux.data.PagingMemoryProxy'

]);

var data, store, columns, queryGrid, pager;
Ext.onReady(function () {
    initBtnFunc();
});

function initBtnFunc() {

    $(".submit-btn").click(function () {// 保存或者修改
        /**
         * ajax方式提交表单
         */
        var type = $("#type").val();
        alert(type);
        var url = rootPath + "/bike-info/save-bike";
        $.ajax({
            url: url,
            dataType: 'json',
            type: 'post',
            data: $("#fbean").serialize(),
            success: function (value) {
                alert(value.msg);
                window.location.href = rootPath + "/page/bike/itemMgnt.jsp";
            },
            error: function (value) {
                alert(value.msg);
            }
        });

    });
}
